Skip to content

Allow web-based payment handlers to report back internal error#429

Draft
stephenmcgruer wants to merge 2 commits intogh-pagesfrom
support-operation-error
Draft

Allow web-based payment handlers to report back internal error#429
stephenmcgruer wants to merge 2 commits intogh-pagesfrom
support-operation-error

Conversation

@stephenmcgruer
Copy link
Collaborator

@stephenmcgruer stephenmcgruer commented Mar 4, 2026

See #428 and w3c/payment-request#1040

closes #???

The following tasks have been completed:

  • web platform tests (link)
  • MDN Docs added (link)

Implementation commitment:

  • Safari (link to issue)
  • Chrome (link to issue)
  • Firefox (link to issue)
  • Edge (public signal)

Preview | Diff

Copy link
Member

@romandev romandev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks great

</li>
<li>If <var>handlerResponse</var>.<a data-lt=
"PaymentHandlerResponse.details">details</a> is not present
or not <a>JSON-serializable</a>, run the <a>payment app
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I noticed that the details validation step doesn't pass an OperationError DOMException to the payment app failure algorithm, while the other validation steps (e.g., methodName, shippingAddress, payerName, etc.) all do.

Was this intentional, or just accidentally missed? Let me know if there's a reason for treating it differently — I might be missing some context.

<ol class="algorithm">
<li>
If |reason| is an {{"OperationError"}} {{DOMException}}, then run
the <a>Payment handler indicates an internal error algorithm</a> as
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Might need a data-cite import here? The link doesn't seem to resolve in the preview.

defined in [[!payment-request]].
</li>
<li>
Otherwise, run the <a>user aborts the payment request algorithm</a>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants